package services;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;




import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import modelo.Combobebidaxsalon;
import modelo.Combobebida;
import modelo.Salon;
import dao.ComboBebidaXSalonDao;
 
 
@ManagedBean(name="comboBebidaXSalonService", eager = true)
@ApplicationScoped
public class ComboBebidaXSalonService implements Serializable{
     
	/**
	 * 
	 */
	private static final long serialVersionUID = 5485881373929049562L;
	private Combobebidaxsalon combobebidaxsalon;
	private List<Combobebidaxsalon> listacombobebidaxsalon;
	private ComboBebidaXSalonDao combobebidaxsalonDao;
	
	public ComboBebidaXSalonService() {
		super();
		this.combobebidaxsalon = new Combobebidaxsalon();
		this.listacombobebidaxsalon = new ArrayList<Combobebidaxsalon>();
		this.combobebidaxsalonDao = new ComboBebidaXSalonDao();
		
		listacombobebidaxsalon=combobebidaxsalonDao.obtenerComboBebidaXSalon();
	}

	    
  public void guardarComboBebidaXSalon(Salon s, Combobebida cb, float p)
	{
    	combobebidaxsalonDao.guardarComboBebidaXSalon(s,cb,p);
	}
    
//    public void guardarComboBebidaXSalon(Combobebidaxsalon cbxs) throws Exception
//	{
//    	combobebidaxsalonDao.guardarComboBebidaXSalon(cbxs);
//	}
    
    public Combobebidaxsalon getCombobebidaxsalon() {
		return combobebidaxsalon;
	}


	public void setCombobebidaxsalon(
			Combobebidaxsalon combobebidaxsalon) {
		this.combobebidaxsalon = combobebidaxsalon;
	}


	public List<Combobebidaxsalon> getListacombobebidaxsalon() {
		return listacombobebidaxsalon;
	}


	public void setListacombobebidaxsalon(
			List<Combobebidaxsalon> listacombobebidaxsalon) {
		this.listacombobebidaxsalon = listacombobebidaxsalon;
	}


	public ComboBebidaXSalonDao getCombobebidaxsalonDao() {
		return combobebidaxsalonDao;
	}


	public void setCombobebidaxsalonDao(
			ComboBebidaXSalonDao combobebidaxsalonDao) {
		this.combobebidaxsalonDao = combobebidaxsalonDao;
	}
    
	public List<Combobebidaxsalon> obtenerCaracteristicasxSalon(int idSalon){
		return combobebidaxsalonDao.obtenerCombobebidaxSalon(idSalon);
	}


	public List<Combobebidaxsalon> getListacombobebidaxsalon(Integer salonSel) {
		// TODO Auto-generated method stub
		return combobebidaxsalonDao.obtenerCombobebidaxSalon(salonSel);
	}
}
